import java.util.Scanner;

public class demo1 {
    public static void main(String[]args){
        Scanner reader = new Scanner(System.in);
        System.out.println("输入小王的性别");
        String wGender = reader.next();
        System.out.println("输入小张的性别");
        String zGender = reader.next();
        if ((wGender.equals("男")&&zGender.equals("男"))||(wGender.equals("女")&&zGender.equals("女"))){
        System.out.println("不可以结婚");
    }else{
            System.out.println("可以结婚");}
    }
}
